package com.cy.pj.goods.pojo;

import lombok.Data;


public class R {
    private Integer code = 1;
    private String message = "成功执行";
    private Object data;

    public R() {
    }

    public R(String message) {
        this.message = message;
    }

    public R(Object data) {
        this.data = data;
    }

    public R(Throwable e) {
        this.code = 0;
        this.message = e.getMessage();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
